<? FoundryView::includeTpl( 'adminMain:header' ) ?>

<script type="text/javascript" src="<?=Foundry::config('webpath')?>/javascript/admin/newsRules.js"></script>

<div id="mainContent">

	<h2>Image Manager</h2>
	
	<a href="<?=FoundryView::helperLinkTo('imageBucketAdmin/upload')?>" class="actionLink">
		<img src="<?=Foundry::config('webpath')?>/images/admin/add.png" />
		new image</a>
	<span id="actionMessage"></span>
	
	<?php if( $this->data['upload'] && $this->data['upload'] == 'false' ) : ?>
		<br /><br /><span class="error">
			Your image could not be uploaded. It may be too large or the incorrect file type.
		</span><br /><br /><br />
	<?php endif ?>
	
	<form method="post" class="actionForm" action="<?=FoundryView::helperLinkTo( 'imageBucketAdmin/upload' )?>" enctype="multipart/form-data">

		<input type="file" name="imageFile" /><p />
		<input type="submit" value="Upload image" />
		<a href="<?=FoundryView::helperLinkTo( 'imageBucketAdmin/' )?>" class="cancelLink">
			Cancel</a>
		
	</form>
	
</div>

<? FoundryView::includeTpl( 'adminMain:footer' ) ?>